<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="root">
        <div>
            <div>
                <label>姓名:</label>
                <input type="text" v-model="user.name">
            </div>
            <div>
                <label>性别:</label>
                <input type="radio" name="sex" v-model="user.gender" value="1">男
                <input type="radio" name="sex" v-model="user.gender" value="0">女
            </div>
            <div>
                <label>身份:</label>
                <select v-model="user.shenfen">
                    <option value="teacher">老师</option>
                    <option value="student">学生</option>
                    <option value="banzhuren">班主任</option>
                </select>
            </div>
            <div>
                <label>兴趣</label>
                <input type="checkbox" v-model="user.hobby" value="playgames">打游戏
                <input type="checkbox" v-model="user.hobby" value="playbasketball">打篮球
                <input type="checkbox" v-model="user.hobby" value="palyfootball">踢足球
            </div>
            
        </div>
    </div>
    <script>
        new Vue({
            el:'#root',
            data(){
                return{
                    user:{
                        name:'',
                        gender:1,
                        hobby:[],
                        shenfen:""
                    }
                }
            }
        })
    </script>
</body>
</html>